home *** CD-ROM | disk | FTP | other *** search
/ SGI Desktop Special Edition 1.1 / SGI Desktop Special Edition 1.1.iso / dist / SoftWindows2.idb / usr / lib / SoftWindows2 / bin / dos6.z / dos6
Encoding:
Text File  |  1995-11-13  |  992 b   |  37 lines

  1. #!/bin/sh
  2. # dos6 shell script
  3.  
  4. # When running this script directly from some session/window managers
  5. # (e.g. dxsession, mwm) we may need to set-up the user's environment in order
  6. # for SoftWindows to run correctly (e.g get the value of LM_LICENSE_FILE if
  7. # required). To do this the script must be invoked with -ls as it's first
  8. # argument .... (c.f xterm, dxterm).
  9. test "$1" = "-ls" && {
  10.     test -r $HOME/.profile && . $HOME/.profile
  11.     shift
  12. }
  13.  
  14. # First look for SoftWindows2 in SWIN2HOME/bin
  15. test $SWIN2HOME && test -x $SWIN2HOME/bin/SoftWindows2 && {
  16.     exec $SWIN2HOME/bin/SoftWindows2
  17. }
  18.  
  19. # SWIN2HOME not defined or $SWIN2HOME/bin doesn't contain a SoftWindows2
  20. # Look for a SoftWindows2 in the directory that this script was found in.
  21. case $0 in
  22. /*)
  23.     BINDIR=`dirname $0`
  24.     ;;
  25. *)
  26.     mypath=`dirname $0`
  27.     BINDIR=`(cd $mypath;pwd)`
  28.     ;;
  29. esac
  30.  
  31. test -x $BINDIR/SoftWindows2 && {
  32.     exec $BINDIR/SoftWindows2
  33. }
  34.  
  35. # Couldn't find a SoftWindows2, so just try for one on the path somewhere.
  36. exec SoftWindows2
  37.